package com.entities.report.requestmapparser;

import com.core.utils.RequestParams;
import com.model.report.Report;


public class ReportMapParser {

	public static Report fromMap ( RequestParams requestParams ) {

		if ( requestParams == null ) {
			return null;
		}


		String name = requestParams.stringAtIndexForKey(0, "name");

		String description = requestParams.stringAtIndexForKey(0, "description");

		String sqlScript = requestParams.stringAtIndexForKey(0, "sqlScript");

		Report template = null;
		template = new Report();
		template.setName(name);
		template.setDescription(description);
		template.setSqlScript(sqlScript);

		return template;

	}

}
